package com.blog.vo;

import com.blog.util.CustomSystemUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.net.Inet4Address;
import java.net.InetAddress;
import java.net.UnknownHostException;

/**
 * @author tangqj
 * @Description 配置信息vo
 * @create 2020/3/7 14:23
 */
@Component
public class ConfigVO {
    private static Logger logger = LoggerFactory.getLogger(CustomSystemUtil.class);
    public ConfigVO() throws UnknownHostException {
        InetAddress ip4 = Inet4Address.getLocalHost();
        this.ip="129.204.188.121";
        System.out.println(CustomSystemUtil.INTERNET_IP);
        System.out.println(CustomSystemUtil.INTRANET_IP);
        System.out.println(ip4.getHostAddress());

    }
    @Value("${server.port}")
    public static String port;

    public static String ip;


    public String getPort() {
        return port;
    }
    @Value("${server.port}")
    public void setPort(String port) {
        this.port = port;
    }

}
